﻿<%@ Page Language="C#" MasterPageFile="~/BabyAdminCP/Admin.master" AutoEventWireup="true" CodeFile="QLLienHe.aspx.cs" Inherits="Admin_LienHe_QLLienHe"%>
<%@ Register Assembly="PagerControl" Namespace="CutePager" TagPrefix="cc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HomePlaceHolder" Runat="Server">
<script language="javascript" type="text/javascript">
    var GB_ROOT_DIR = "../../GREY_BOX/";
    function View_LienHe(id) {
        var url = "../BabyAdminCP/LienHe/HTLienHe.aspx?id=" + id;
        return GB_showCenter('Liên hệ', url, 400, 620);
    }

</script>
<script type="text/javascript" src="../../GREY_BOX/AJS.js"></script>
<script type="text/javascript" src="../../GREY_BOX/AJS_fx.js"></script>
<script type="text/javascript" src="../../GREY_BOX/gb_scripts.js"></script> 
<div class="hrm_header_placeholder">Danh sách Liên hệ</div>
<div style="padding: 10px">
<asp:HiddenField ID="H_CatalogId" Value="0" runat="server" />

<asp:Panel ID="PanelAdd" Width="100%" GroupingText="Tìm kiếm Thông tin"  runat="server">
<table border="0" width="100%" cellpadding="0" cellspacing="0">
    <tr><td colspan="8" height="10"></td></tr>
    <tr>
        <td width="20"></td>
        <td width="90" class="hrm_title_blue">Tiêu đề</td>
        <td width="7" class="hrm_title_blue"></td>        
        <td width="220">
             <asp:TextBox ID="txtTieuDe" CssClass="hrm_textbox" Width="200px" MaxLength="50" runat="server"></asp:TextBox>
        </td>
        <td>
            <asp:ImageButton ID="cmdTimKiem" ImageUrl="~/Images/search.jpg" runat="server" onclick="cmdTimKiem_Click" />
        </td>
    </tr>
    <tr><td colspan="8" height="15"></td></tr>    
</table>    
</asp:Panel>
<asp:Panel ID="PanelList" Width="100%" Height="355" GroupingText="Danh sách" runat="server">
<table border="0" width="100%" cellpadding="0" cellspacing="0">    
    <tr>
        <td width="20"></td>
        <td style="padding-right:15px; padding-top:10px">
            <asp:GridView ID="gridCatalog" runat="server" DataKeyNames="Id" Width="100%" BackColor="White"
                EmptyDataText="<br><center>Không tồn tại dữ liệu</center><br>"
                BorderColor="#CCCCCC" AutoGenerateColumns="false" BorderStyle="Solid" 
                    BorderWidth="1px" CellPadding="3" 
                    onrowdatabound="gridCatalog_RowDataBound" onrowcommand="gridCatalog_RowCommand" 
                    onrowdeleting="gridCatalog_RowDeleting">
                <Columns>
                    <asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="STT" ItemStyle-Width="30">
                        <ItemTemplate>    
                            <asp:Label ID="Label1" runat="server" Text='<%# Container.DataItemIndex + 1 %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField> 
                    <asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7%">
                        <ItemTemplate>
                            <a href="#" class="command_button" onclick="JavaScript:View_LienHe('<%#Eval("id")%>')">Xem</a>
                        </ItemTemplate>
                    </asp:TemplateField>                                                        
                    <asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7%">
                        <ItemTemplate>    
                            <asp:LinkButton ID="cmdDelete" CssClass="command_button" runat="server" CausesValidation="false" runat="server" Text="Delete" CommandName="Delete" CommandArgument='<%# Eval("id") %>'>Xóa</asp:LinkButton>                           
                        </ItemTemplate>
                    </asp:TemplateField>                       
                    <asp:BoundField DataField="TieuDe" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="15%" HeaderText="Tiêu đề"></asp:BoundField>                                   
                    <asp:BoundField DataField="HoTen" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="13%" HeaderText="Người gửi"></asp:BoundField>

                    <asp:BoundField DataField="ThuDienTu" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="15%" HeaderText="Email"></asp:BoundField>
                    <asp:BoundField DataField="NoiDung" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="20%" HeaderText="Nội Dung"></asp:BoundField>
                    <asp:BoundField DataField="NgayCapNhat" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:dd/MM/yyyy}" HeaderText="Ngày gửi"></asp:BoundField>
                    <asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"
                        HeaderText="Trạng thái" ItemStyle-Width="10%">
                        <ItemTemplate>
                            <asp:Label ID="lbTrangThai" runat="server" Text='<%# (Eval("TrangThai").ToString())=="True" ? "<html><img src=../../Images/checkk.png /></html>" : "<html><img src=../../Images/redx.png /></html>"%>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" Width="8%" />
                    </asp:TemplateField>
                </Columns>                  
                <RowStyle ForeColor="#000066" Height="20" />
                <SelectedRowStyle BackColor="#dedfdf" Font-Bold="True" ForeColor="Gray" />
                <HeaderStyle BackColor="#006699" Font-Bold="True" HorizontalAlign="Left" ForeColor="White" />               
            </asp:GridView>
        </td>
    </tr>    
    <tr><td colspan="2" height="10">&nbsp;</td></tr>    
</table>    
</asp:Panel>
</div>
<asp:Panel ID="Panel2" CssClass="div_footer" BackColor="#d6e6f5" runat="server" Height="24px" >
<table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr>
        <td></td>
        <td align="right">
            <cc1:pager id="Pager1" runat="server" PreviousClause="" NextClause="" LastClause="" FirstClause="" PageClause="" OfClause="/" PageSize="14" OnCommand="Pager1_Command" ></cc1:pager>
        </td>
    </tr>
</table>
</asp:Panel> 
</asp:Content>

